package com.ruoyi.web.controller.house;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.domain.dto.SubscribeLookHouseDto;
import com.ruoyi.system.domain.vo.SubscribeLookHouseVo;
import com.ruoyi.system.service.ISubscribeLookHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("house/subscribeLookHouse")
public class SubscribeLookHouseController {

    @Autowired
    private ISubscribeLookHouseService subscribe;

    @PostMapping("/list")
    public Map getSubscribeLookHouseList(@RequestBody SubscribeLookHouseDto sub){

        return subscribe.getSubscribeLookHouseList(sub);
    }

    //修改状态
    @PutMapping("/changeStates")
    private void changeStates( @RequestBody SubscribeLookHouseVo sub){
        subscribe.changeStates(sub.getId(),sub.getStates());
    }

    //修改催单状态
    @PutMapping("/changeExpediteStates")
    private void changeExpediteStates(@RequestBody SubscribeLookHouseVo sub){
        subscribe.changeExpediteStates(sub.getId(),sub.getExpediteStates());
    }
}
